package it.poste.il.compensatore.dao;

import java.util.List;

import it.poste.il.compensatore.entities.Message;
import org.springframework.stereotype.Repository;

/**
 * Interface for MessageDao.
 */
@Repository
public interface MessageDao extends BaseEntityDao<Message> {

	/**
	 * Take id of the operation from message.
	 * @param msg Entity Message.
	 * @return int Id of the operation.
	 */
	int selectOperationId(Message msg);

	/**
	 * Take id of the status from message.
	 * @param msg Entity Message.
	 * @return int Id of the status.
	 */
	int selectStatusId(Message msg);

	/**
	 * List of messages by type.
	 * @param int Type of messages.
	 * @return List List of messages.
	 */
	List<Message> loadListByType(int type);
}
